package com.ruoyi.common.core.rabbitmq;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class EmailMQSender {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    //生产者发送邮件到MQ
    public void send(String exchange,String routingKey,Object msg){
        rabbitTemplate.convertAndSend(exchange, routingKey, msg);
    }
}
